package com.digitalchina.lxnsy.sy.milkManagement;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;


public class MilkAddActivity extends BaseHtmlActivity {
    private int tag = 0;

    @Override
    protected void loadHtml() {

        webView.addJavascriptObject(new JsApi(), null);
        loadUrl("milkAdd");
        callJsMethod("refresh");
        setTitle("新增羊奶销售");

    }

    @Override
    public void onResume() {
        super.onResume();
        if (tag > 0) {
            //    showToast("refresh");
            callJsMethod("refresh");
        }
        tag++;

    }

    @Override
    public void rightOnClick() {


    }


    public class JsApi {
        @JavascriptInterface
        public void enterpriseAdd(Object msg) {
             go(EnterpriseAddActivity.class);

        }

        @JavascriptInterface
        public void milkSource(Object msg) {
            go(MilkSourceActivity.class);

        }







    }
}
